<template>
  <div class="login" :style="bg">
    <div :style="other"></div>
    <van-row
      type="flex"
      justify="center"
      align="center"
      class="height__100 width__70 margin_0_auto"
    >
      <van-col span="24">
        <p class="text_align_center margin_0">
          <img src="@/assets/images/logo.png" class="width_100" />
        </p>
        <p
          class="text_align_center margin_0 font_size_24 color_FFF margin_top_8"
        >
          物联网智能管控
        </p>
        <van-form @submit="onSubmit" style="position: relative">
          <van-field
            v-model="loginForm.username"
            name="用户名"
            label=""
            placeholder="用户名"
            :rules="[{ required: true, message: '请填写用户名' }]"
          />
          <van-field
            v-model="loginForm.password"
            name="密码"
            label=""
            placeholder="密码"
            :rules="[{ required: true, message: '请填写密码' }]"
          />
          <van-field
            v-model="loginForm.validate"
            name="验证码"
            label=""
            placeholder="验证码"
            style="width: 65%;"
          >
            <!-- <template #button>
            </template> -->
          </van-field>
          
              <img
                @click="getcodeImg()"
                class="border_radius_4 margin_left_16 float_right cursor_pointer height_24"
                :style="captcha"
                v-if="verificationCode != ''"
                :src="verificationCode"
                alt=""
              />
          <van-button
            block
            type="info"
            size="small"
            native-type="submit"
            color="linear-gradient(to right, #00fbab, #00fbab)"
            class="border_radius_8 height_40"
            >登 录</van-button
          >
          <p class="font_size_14 text_align_center color_588cd9 margin_top_8" style="color:#e0faf1">
            登陆不进去，请联系管理员
          </p>
        </van-form>
      </van-col>
    </van-row>
  </div>
</template>
<script src="./login.js" />
